home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 6 / coreaids.zip / CHAR_GET.ASM < prev    next >
Assembly Source File  |  1987-06-25  |  771b  |  31 lines

  1. ;    DESC:    gets a character from the keyboard                   V1.00
  2. ;    IN:    *{REQ_TYPE} (0:get character,1:see if character
  3. ;         is there,2:get shift status)
  4. ;    OUT:    *{CHAR} character ( high byte is shift status,
  5. ;         low byte is char.)
  6. ;    SAMPLE:    Callm    CHAR_GET,<REQ_TYPE>,<CHAR>
  7. ;    #######################################################
  8.  
  9.     Extrn    PUSHALL:Near
  10.     Extrn    POPALL:Near
  11.  
  12. CHAR_GEC    Segment
  13.     Assume    CS:CHAR_GEC
  14.     Public    CHAR_GET
  15.  
  16.                         ;notice.
  17.     DB    'CHAR_GET - V1.00, Copyright 1987, CoreTechs   ',0DH,0AH
  18.  
  19. CHAR_GET    Proc    Near
  20.     Call    PUSHALL                ;save registers.
  21.  
  22.     Pop    AX                ;recover request value.
  23.     Int    16H                ;get character.
  24.     Push    AX                ;save character and scan code.
  25.  
  26.     Call    POPALL                ;recover registers.
  27.     Ret
  28. CHAR_GET    Endp
  29. CHAR_GEC    Ends
  30.     End
  31.